<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
  import {isLogin} from 'common/js/user'

  export default {
    mounted() {
      this._setRem();
      window.addEventListener('resize', this._setRem);//窗体大小改变
    },
    methods: {
      _setRem() { //移动端设置rem大小
        let width = document.body.clientWidth;
        document.getElementsByTagName('html')[0].style.fontSize = width / 10.8 + 'px';
      }
    }
  }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  @import "~common/stylus/variable"
  #app
    min-height: 100%;

</style>
